export const timeOutOptions = [
  { label: '12小时内超过', value: 12 },
  { label: '24小时内超过', value: 24 },
]

export const dealTree1Select = (arr) => {
  const newArr = [];
  arr.map(item=>{
    if(item == 'last'){
      newArr.push(4, 5, 8, 9, 13, 14);
    }else if(item == 44){
      newArr.push(4)
    }else if(item == 88){
      newArr.push(8)
    }else{
      newArr.push(item)
    }
  })
  return [...new Set(newArr)];
}

export const treeData1 = [
  {
    title: '待卖家处理',
    value: 0,
    key: 0,
  },
  {
    title: '卖家拒绝退货',
    value: 1,
    key: 1,
  },
  {
    title: '待买家退货',
    value: 2,
    key: 2,
  },
  {
    title: '待卖家确认收货',
    value: 3,
    key: 3,
  },
  {
    title: '待商家后台操作寄出',
    value: 15,
    key: 15,
  },
  {
    title: '待卖家发货',
    value: 6,
    key: 6,
  },
  {
    title: '换货卖家发货',
    value: 7,
    key: 7,
  },
  {
    title: '换货买家确认收货',
    value: 8,
    key: 8,
  },
  {
    title: '平台处理中',
    value: 12,
    key: 12,
  },
  {
    title: '已完结',
    value: 'last',
    key: 'last',
    children: [
      {
        title: '退款成功',
        value: 4,
        key: 4,
      },
      {
        title: '退款关闭',
        value: 5,
        key: 5,
      },
      {
        title: '换货成功',
        value: 88,
        key: 88,
      },
      {
        title: '换货关闭',
        value: 9,
        key: 9,
      },
      {
        title: '补发成功',
        value: 13,
        key: 13,
      },
      {
        title: '补发关闭',
        value: 14,
        key: 14,
      },
      {
        title: '退款完结',
        value: 44,
        key: 44,
      },
    ],
  },
]

export const dealTree2Select = (arr) => {
  const newArr = [];
  arr.map(item=>{
    if(item == 'second'){
      newArr.push('normal', 'defective', 'more', 'less');
    }else{
      newArr.push(item)
    }
  })
  return [...new Set(newArr)];
}


export const treeData2 = [
  {
    title: '买家已退货',
    value: 'buyerReturned',
    key: 'buyerReturned',
  },
  {
    title: '卖家已收到退货',
    value: 'second',
    key: 'second',
    children: [
      {
        title: '商品无误',
        value: 'normal',
        key: 'normal',
      },
      {
        title: '存在次品',
        value: 'defective',
        key: 'defective',
      },
      {
        title: '多收货',
        value: 'more',
        key: 'more',
      },
      {
        title: '部分收货',
        value: 'less',
        key: 'less',
      },
    ],
  },
  {
    title: '实物与登记不符',
    value: 'diff',
    key: 'diff',
  },
  {
    title: '卖家未收到货',
    value: 'waitSellerReceive',
    key: 'waitSellerReceive',
  },
]

export const afterTypeOptions = [
  { label: '退货退款', value: 0 },
  { label: '未发货仅退款', value: 2 },
  { label: '已发货仅退款', value: 1 },
  { label: '补发', value: 7 },
  { label: '换货', value: 3 },
]

export const interceptOptions = [
  { label: '待拦截', value: 0 },
  { label: '已发起拦截', value: 1 },
  { label: '拦截成功', value: 2 },
  { label: '拦截失败', value: 3 },
]

export const orderSnOptions = [
  { label: '售后单号', value: 'afterSaleSn' },
  { label: '平台售后单号', value: 'platRefundSn' },
]

export const logisticOptions = [
  { label: '退货快递', value: 'refundLogisticsNo' },
  { label: '换货/补寄', value: 'reissueLogisticsNo' },
]